<template>
	<view>
		<Navbar></Navbar>
		<view class="u-m-20 u-card-box u-p-30">
			<view class="u-color-puce u-font-34 u-font-bold">¥{{bankData.price}}</view>
			<view class="u-m-t-20 u-font-666 u-font-26 u-font-bold">{{bankData.title1}}</view>
			<view class="u-m-t-15 u-font-666 u-font-26 u-font-bold">{{bankData.title2}}</view>
			<view class="u-m-t-40 u-font-bold u-font-666">
				<span class="u-color-puce">户名：</span>
				<span>{{bankData.bank_open}}</span>
			</view>
			<view class="u-m-t-10 u-font-bold u-font-666">
				<span class="u-color-puce">账号：</span>
				<span>{{bankData.bank_account}}</span>
			</view>
			<view class="u-m-t-10 u-font-bold u-font-666">
				<span class="u-color-puce">银行：</span>
				<span>{{bankData.bank_name}}</span>
			</view>
			<view class="u-m-t-10 u-font-bold u-font-666">
				<span class="u-color-puce">汇款金额：</span>
				<span>{{bankData.price}}</span>
			</view>
			<view class="u-m-t-40 u-tag-box u-back-black u-p-t-8 u-p-b-8 u-p-l-30 u-p-r-30" @click="onCopyBank">复制</view>
		</view>
		<Bottom @confirm="confirm"></Bottom>
	</view>
</template>

<script>
	import Navbar from '@/components/Navbar.vue'
	import Bottom from '@/components/Bottom.vue'
	export default{
		components:{
			Navbar,
			Bottom
		},
		data(){
			return{
				bankData: uni.getStorageSync("bank")
			}
		},
		methods:{
			onCopyBank(){
				let text = `户名：${this.bankData.bank_open}` + '\n' + `账号：${this.bankData.bank_account}` + '\n' + `银行：${this.bankData.bank_name}` + '\n' + `汇款金额：${this.bankData.price}`
				uni.setClipboardData({
					data:text,
					success: function(){
						uni.showToast({
							title:"复制成功",
							icon:'none'
						})
					}
				})
			},
			confirm(){
				uni.switchTab({
					url: "/pages/mine/mine"
				})
			}
		}
	}
</script>

<style>
</style>